﻿namespace WebPacker.Tests.Packs.Watchers
{
	using WebPacker.Packs.Resources;
	using WebPacker.Packs.Watchers;

	public class CompositeWatcherTest : ResourceWatcherBaseTest
	{
		private static readonly string testFilePath1 = @"samples\test1.js";
		private readonly string testFileUri1 = TestHelper.GetFileUri(testFilePath1);

		protected override IResourceWatcher GetMonitor()
		{
			var monitor = new CompositeWatcher();
			monitor.Register(new FileWatcher());
			monitor.Register(new RemoteWatcher());
			return monitor;
		}

		protected override IResource GetTestResource()
		{
			return new FileResource(testFilePath1);
		}

		protected override IResource[] GetTestResources()
		{
			return new IResource[] { new FileResource(testFilePath1), new RemoteResource(testFileUri1) };
		}

		protected override IResource GetNotAcceptableResource()
		{
			return new ContentResource("test");
		}
	}
}
